#include "degfx/bitmap.h"

void mx_bitmap_offset(MX_BITMAP * bitmap, int x1, int y1)
{
	MX_RECT area;
	int dx, dy;

	area = *MXRECT(bitmap);
	dx = x1 - area.x1;
	dy = y1 - area.y1;

	area.x1 += dx;
	area.y1 += dy;
	area.x2 += dx;
	area.y2 += dy;
	mx_rectatom_place(bitmap, &area);

	bitmap->_clip.x1 += dx;
	bitmap->_clip.y1 += dy;
	bitmap->_clip.x2 += dx;
	bitmap->_clip.y2 += dy;
}
